<?php

namespace fastflow\driver\think;

use fastflow\driver\interfaces\participantIndexTemplate;
use think\Db;

class participantIndex implements participantIndexTemplate
{

    public static function addParticipantIndex($param)
    {
        if (isset($param)) {
            $count = Db::table('__FASTFLOW_PARTICIPANT_INDEX__')->insert($param);
            return $count;
        }
        return false;
    }

    public static function getParticipantIndex($param)
    {
        if (isset($param)) {
            $participantIndex = Db::table('__FASTFLOW_PARTICIPANT_INDEX__')->where($param)->select();
            if (count($participantIndex) == 0) {
                return false;
            }
            return $participantIndex;
        }
        return false;
    }


}